Copy secure_boot flag in boot params across kexec reboot
authorDave Young <dyoung@redhat.com>
Wed, 5 Apr 2017 16:40:30 +0000 (17:40 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 14 Jan 2018 19:45:05 +0000 (19:45 +0000)
commiteda1e0e05d2696dff5c15d2df0d4cc99378498fa
treec1a3ae901c34456736080008300abd9de8a1d287
parent3f60cd616be9d577c9581e664120ac7238405e2d
Copy secure_boot flag in boot params across kexec reboot

Kexec reboot in case secure boot being enabled does not keep the secure
boot mode in new kernel, so later one can load unsigned kernel via legacy
kexec_load.  In this state, the system is missing the protections provided
by secure boot.

Adding a patch to fix this by retain the secure_boot flag in original
kernel.

secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the
stub.  Fixing this issue by copying secure_boot flag across kexec reboot.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0045-Copy-secure_boot-flag-in-boot-params-across-kexec-re.patch
arch/x86/kernel/kexec-bzimage64.c